from Vector import Vector

if __name__ == "__main__":
    v1 = Vector([1, 2, 3])
    v2 = Vector((22, 33, 44))
    # print(str(v1))

    # for i in v1:
    #     print(i, end=" ")
    # print()

    # print(v1 + v2)
    # print(v1 - v2)
    # print(v1 * 10)
    # print(10 * v1)
    # print(-v1)  # __neg__ running

    # print(v1[0])
    # print(v1[1])
    # print(v1[2])

    # v1[0] = 11
    # v1[1] = 22
    # v1[2] = 33
    # print(v1[0])
    # print(v1[1])
    # print(v1[2])

    # v1[4] = 44  # should raise a errro
    # v1[-1] = 44

    # 归一化, 和点乘的测试
    v3 = Vector([3, 4])
    v4 = Vector([1, 2])
    print(v3.norm())  # 5
    print(v3 / 5)
    print(v3.normalize())
    print(v3.normalize().norm())

    print(v3.dot(v4))
